#include<stdio.h>
int main ()
{
	int year;
	int c;
	scanf("%d",&year);
    c= (year%4==0 && year%100!=0 || year%400==0? 1: 0);
    //printf("%d\n",c);
    
	return 0;
}
